package w17;

public class Student {
	private String name;//私有的，封装的由来
	private int age;
	
	public String getName() {
		return name;
	}

	public int getAge() {
		return age;
	}

	public void setName(String name) {
		this.name = name;//this表示调用该实例方法的那个对象
	}

	public void setAge(int age) {
		this.age = age;
	}

	public void showMessage() {
		System.out.println("姓名："+name+"，年龄："+age+"岁~");
	}
}
